package cn.bdqn.veh.vomapper;

import cn.bdqn.veh.model.Leader;
import cn.bdqn.veh.model.LicensePlateColor;
import cn.bdqn.veh.model.TruckType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author gurilla
 * @create 2019-08-20 17:54
 */
public interface VehicleVoMapper {
    @Select("select id,abbr from truck_type")
    List<TruckType> getAllTruckType();

    @Select("select id,lname from veh_leader")
    List<Leader> getAllLeader();

    @Select("select id, color from license_plate_color")
    List<LicensePlateColor> getAllColor();

//    @Select("SELECT a.`id`, a.`cidcard`, a.`isauth`, a.`cton`, " +
//            "a.`clength`, a.`cwidth`, a.`cheight`, b.`lname`, b.`phone`, " +
//            "b.`idcard`, c.`cname` FROM veh_vehicle a JOIN veh_leader b " +
//            "ON b.`id`=a.`owner_id` JOIN veh_driver c ON c.`vidcard`= " +
//            "a.`cidcard`")
//    List<Vehicle> list();
}
